package com.hzlh.common.coupon;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: CKQ
 * @DateTime: 2020/8/18 10:52
 * @Description: TODO
 */
public class ActiveConfig {

    //定义所有的方法体
    private static final Map<String,InterfaceInfo> couponActiveList;
    static
    {
        couponActiveList = new HashMap<String, InterfaceInfo>();
        //获取用户优惠券数量
        couponActiveList.put("customer-coupon-count", InterfaceInfo.builder().method("/customerCoupon/getCustomerReceiveCount").mode("get").build());
        couponActiveList.put("customer-coupons-count", InterfaceInfo.builder().method("/customerCoupon/getCustomerCouponCount").mode("get").build());
        couponActiveList.put("customer-coupon-page-list", InterfaceInfo.builder().method("/customerCoupon/pageList").mode("get").build());
        couponActiveList.put("customer-coupon-receive",  InterfaceInfo.builder().method("/customerCoupon/receiveConsumption").mode("post").build());
        couponActiveList.put("insert-customer-publish",  InterfaceInfo.builder().method("/customerCoupon/insertCustomerPublish").mode("get").build());
        couponActiveList.put("customer-coupon-use",  InterfaceInfo.builder().method("/customerCoupon/useConsumption").mode("post").build());
        couponActiveList.put("customer-goods-coupon",  InterfaceInfo.builder().method("/customerCoupon/getGoodsCoupon").mode("post").build());
        couponActiveList.put("customer-coupon-info",  InterfaceInfo.builder().method("/customerCoupon/getCustomerCouponInfo").mode("get").build());
        couponActiveList.put("customer-coupon-list",  InterfaceInfo.builder().method("/customerCoupon/getCustomerCouponList").mode("post").build());
        couponActiveList.put("usable-coupon-list",  InterfaceInfo.builder().method("/customerCoupon/getUsableCouponList").mode("post").build());
        couponActiveList.put("underway-publish",  InterfaceInfo.builder().method("/customerCoupon/getUnderwayPublish").mode("post").build());
        couponActiveList.put("coupon-page-list", InterfaceInfo.builder().method("/pc/coupon/getcouponlist").mode("post").build());
        couponActiveList.put("coupon-data-detail", InterfaceInfo.builder().method("/pc/coupon/getcoupondatadetail").mode("get").build());
        couponActiveList.put("coupon-data-list", InterfaceInfo.builder().method("/pc/coupon/getcoupondatalist").mode("get").build());
        couponActiveList.put("coupon-detail", InterfaceInfo.builder().method("/pc/coupon/getcoupondetail").mode("get").build());
        couponActiveList.put("coupon-end", InterfaceInfo.builder().method("/pc/coupon/endcoupon").mode("put").build());
        couponActiveList.put("coupon-del", InterfaceInfo.builder().method("/pc/coupon/delcoupon").mode("delete").build());
        couponActiveList.put("coupon-add", InterfaceInfo.builder().method("/pc/coupon/add").mode("post").build());
        couponActiveList.put("coupon-save", InterfaceInfo.builder().method("/pc/coupon/save").mode("put").build());
        couponActiveList.put("coupon-all-list", InterfaceInfo.builder().method("/pc/coupon/getallcouponlist").mode("post").build());
        couponActiveList.put("app-page-list", InterfaceInfo.builder().method("/pc/appConfig/pageList").mode("get").build());
        couponActiveList.put("app-info", InterfaceInfo.builder().method("/pc/appConfig/info").mode("get").build());
        couponActiveList.put("app-delete", InterfaceInfo.builder().method("/pc/appConfig/delete").mode("delete").build());
        couponActiveList.put("app-insert", InterfaceInfo.builder().method("/pc/appConfig/insert").mode("post").build());
        couponActiveList.put("app-update",InterfaceInfo.builder().method("/pc/appConfig/update").mode("put").build());
        couponActiveList.put("publish-list",InterfaceInfo.builder().method("/pc/publish/list").mode("get").build());
        couponActiveList.put("publish-all-list",InterfaceInfo.builder().method("/pc/publish/alllist").mode("get").build());
        couponActiveList.put("publish-detail-view",InterfaceInfo.builder().method("/pc/publish/detailview").mode("get").build());
        couponActiveList.put("publish-detail-list",InterfaceInfo.builder().method("/pc/publish/detaillist").mode("get").build());
        couponActiveList.put("publish-all-detail-list",InterfaceInfo.builder().method("/pc/publish/alldetaillist").mode("get").build());
        couponActiveList.put("publish-joincustomerlist",InterfaceInfo.builder().method("/pc/publish/joincustomerlist").mode("get").build());
        couponActiveList.put("publish-all-joincustomerlist",InterfaceInfo.builder().method("/pc/publish/allJoincustomerlist").mode("get").build());
        couponActiveList.put("publish-del",InterfaceInfo.builder().method("/pc/publish/delpublish").mode("delete").build());
        couponActiveList.put("publish-stop",InterfaceInfo.builder().method("/pc/publish/stoppublish").mode("put").build());
        couponActiveList.put("publish-save",InterfaceInfo.builder().method("/pc/publish/savepublish").mode("post").build());
        couponActiveList.put("publish-info",InterfaceInfo.builder().method("/pc/publish/getpublish").mode("get").build());
        couponActiveList.put("give-coupons",InterfaceInfo.builder().method("/customerCoupon/giveCoupons").mode("post").build());
    }

    //获取方法名称
    public static InterfaceInfo getInterfaceInfo(String active){
        for(String key : couponActiveList.keySet()){
            if(key.equals(active)) {
                return couponActiveList.get(key);
            }
        }
        return null;
    }
}
